﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _0712502_0712504_DesignPatternGame
{
    public class AutomatedTank3Builder: TankBuilder
    {
        private AutomatedTank3 _product = new AutomatedTank3();
        public override void BuildBody(TankBodyFactory tankBodyFactory)
        {
            _product.AddBody((TankBodyModel)tankBodyFactory.CreateObject(5));
        }

        public override void BuildTurret(TankTurretFactory tankTurretFactory)
        {
         //   _product.AddBody((TankBodyModel)TankBodyFactory._prototypes[(int)IDTank.idTank3].Clone());
            _product.AddTurret((TankTurretModel)tankTurretFactory.CreateObject(5));
        }

        public override void BuildEngine()
        {
            ChinaEngine engine = new ChinaEngine();
            _product.AddEngine(engine);
        }
        public override TankPrototype GetResult()
        {
            _product.StateUsed = StateInUse.Using;
            return _product;
        }
    }
}
